<!-- HTML header for doxygen 1.8.9.1-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>ROSS: core/tw-kp.c Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <a href="https://github.com/ROSS-org/ROSS">
   <div id="projectname">ROSS
   </div>
   </a>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_af18cf245e3394ab3b436135935cfd6e.html">core</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">tw-kp.c</div>  </div>
</div><!--header-->
<div class="contents">
<a href="tw-kp_8c.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="ross_8h.html">ross.h</a>&gt;</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;</div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="keywordtype">void</span></div>
<div class="line"><a name="l00004"></a><span class="lineno"><a class="line" href="tw-kp_8c.html#aafb58a114f017b8491090ea372312684">    4</a></span>&#160;<a class="code" href="tw-kp_8c.html#aafb58a114f017b8491090ea372312684">tw_kp_onpe</a>(<a class="code" href="ross-types_8h.html#a1c8bf5a99e9de5022cdaa304f3979e57">tw_kpid</a> <span class="keywordtype">id</span>, <a class="code" href="structtw__pe.html">tw_pe</a> * <a class="code" href="avl__tree_8c.html#ac4c639748d4d5a271d6c54a18f614605">pe</a>)</div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;{</div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;        <span class="keywordflow">if</span>(<span class="keywordtype">id</span> &gt;= <a class="code" href="ross-extern_8h.html#a4a237c68db5a0325e986d3710088d427">g_tw_nkp</a>)</div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;                <a class="code" href="ross-extern_8h.html#a49ed2388aaae26e43280b7909c834aaa">tw_error</a>(<a class="code" href="ross-extern_8h.html#afffdf140f2c492f61546ad783833f127">TW_LOC</a>, <span class="stringliteral">&quot;ID %d exceeded MAX KPs&quot;</span>, <span class="keywordtype">id</span>);</div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;</div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;        <span class="keywordflow">if</span>(<a class="code" href="ross-extern_8h.html#a64132b3acc0476622c31d7dc1676d227">g_tw_kp</a>[<span class="keywordtype">id</span>])</div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;                <a class="code" href="ross-extern_8h.html#a49ed2388aaae26e43280b7909c834aaa">tw_error</a>(<a class="code" href="ross-extern_8h.html#afffdf140f2c492f61546ad783833f127">TW_LOC</a>, <span class="stringliteral">&quot;KP already allocated: %lld\n&quot;</span>, <span class="keywordtype">id</span>);</div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;</div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;        <a class="code" href="ross-extern_8h.html#a64132b3acc0476622c31d7dc1676d227">g_tw_kp</a>[id] = (<a class="code" href="structtw__kp.html">tw_kp</a> *) <a class="code" href="ross-extern_8h.html#a445b1ed30cd2e8ef1f837e782a339a70">tw_calloc</a>(<a class="code" href="ross-extern_8h.html#afffdf140f2c492f61546ad783833f127">TW_LOC</a>, <span class="stringliteral">&quot;Local KP&quot;</span>, <span class="keyword">sizeof</span>(<a class="code" href="structtw__kp.html">tw_kp</a>), 1);</div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;</div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;        <a class="code" href="ross-extern_8h.html#a64132b3acc0476622c31d7dc1676d227">g_tw_kp</a>[id]-&gt;<a class="code" href="structtw__kp.html#afb056d26713ffb46913315b0d2f2651b">id</a> = id;</div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;        <a class="code" href="ross-extern_8h.html#a64132b3acc0476622c31d7dc1676d227">g_tw_kp</a>[id]-&gt;<a class="code" href="structtw__kp.html#a9e8fe6319cfd909db8f50e29ce43b1fc">pe</a> = <a class="code" href="avl__tree_8c.html#ac4c639748d4d5a271d6c54a18f614605">pe</a>;</div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;</div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="preprocessor">#ifdef ROSS_QUEUE_kp_splay</span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="preprocessor"></span>        <a class="code" href="ross-extern_8h.html#a64132b3acc0476622c31d7dc1676d227">g_tw_kp</a>[id]-&gt;pq = tw_eventpq_create();</div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="preprocessor"></span>}</div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;</div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="keywordtype">void</span></div>
<div class="line"><a name="l00023"></a><span class="lineno"><a class="line" href="tw-kp_8c.html#a5b88c07fbc4f7810bdc676306013b513">   23</a></span>&#160;<a class="code" href="tw-kp_8c.html#a5b88c07fbc4f7810bdc676306013b513">tw_kp_rollback_to</a>(<a class="code" href="structtw__kp.html">tw_kp</a> * kp, <a class="code" href="ross_8h.html#a80b370bc538e17441aef6afaff852678">tw_stime</a> to)</div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;{</div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;        <a class="code" href="structtw__event.html">tw_event</a>       *e;</div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;        <a class="code" href="aarch64_8h.html#abcd6b97b84bebf1f961f85cd24b56c60">tw_clock</a> pq_start;</div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;</div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;        kp-&gt;<a class="code" href="structtw__kp.html#ae0128e497a3731c114d91552ae531ce8">s_rb_total</a>++;</div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;        <span class="comment">// instrumentation</span></div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;        kp-&gt;<a class="code" href="structtw__kp.html#a05a49ec7f8f98c6d7d8ca15ae1f8abdb">kp_stats</a>-&gt;<a class="code" href="structst__kp__stats.html#ae2b4a980d36048635b285ae9741c5e50">s_rb_total</a>++;</div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;</div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="preprocessor">#if VERIFY_ROLLBACK</span></div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="preprocessor"></span>        printf(<span class="stringliteral">&quot;%d %d: rb_to %f, now = %f \n&quot;</span>,</div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;               kp-&gt;<a class="code" href="structtw__kp.html#a9e8fe6319cfd909db8f50e29ce43b1fc">pe</a>-&gt;<a class="code" href="structtw__pe.html#a8a57f2123eddf6a195d82ecc781093e6">id</a>, kp-&gt;<a class="code" href="structtw__kp.html#afb056d26713ffb46913315b0d2f2651b">id</a>, <a class="code" href="ross_8h.html#a096f73feb08316896d644277b486c9ea">TW_STIME_DBL</a>(to), <a class="code" href="ross_8h.html#a096f73feb08316896d644277b486c9ea">TW_STIME_DBL</a>(kp-&gt;<a class="code" href="structtw__kp.html#aabf1253aa1eb55c613a70fb3c9271117">last_time</a>));</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;        <span class="keywordflow">while</span>(kp-&gt;<a class="code" href="structtw__kp.html#a3f7a839239647d5c13db750f34c11013">pevent_q</a>.<a class="code" href="structtw__eventq.html#a0c96afb4c69e6f7bba7e72b1332dbd6e">size</a> &amp;&amp; <a class="code" href="ross_8h.html#a650bdf282bba8368dd3325bed7e12abc">TW_STIME_CMP</a>(kp-&gt;<a class="code" href="structtw__kp.html#a3f7a839239647d5c13db750f34c11013">pevent_q</a>.<a class="code" href="structtw__eventq.html#a0a1d2a79704a9bb361cbc1c1a1f67952">head</a>-&gt;<a class="code" href="structtw__event.html#a4e32bfdbde0d1cae06b5b3fb90adbffa">recv_ts</a>, to) &gt;= 0)</div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;        {</div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;                e = <a class="code" href="tw-eventq_8h.html#aecf7d4bfd567e6356033b8379f5ec3bd">tw_eventq_shift</a>(&amp;kp-&gt;<a class="code" href="structtw__kp.html#a3f7a839239647d5c13db750f34c11013">pevent_q</a>);</div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;</div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;                <span class="comment">/*</span></div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;<span class="comment">                 * rollback first</span></div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;<span class="comment">                 */</span></div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;                <a class="code" href="ross-extern_8h.html#ad90c1310a5aeee6d9bff67237f3e9913">tw_event_rollback</a>(e);</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;                <span class="comment">/*</span></div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;<span class="comment">                 * reset kp pointers</span></div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;<span class="comment">                 */</span></div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;                <span class="keywordflow">if</span> (kp-&gt;<a class="code" href="structtw__kp.html#a3f7a839239647d5c13db750f34c11013">pevent_q</a>.<a class="code" href="structtw__eventq.html#a0c96afb4c69e6f7bba7e72b1332dbd6e">size</a> == 0)</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;                {</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;                        kp-&gt;<a class="code" href="structtw__kp.html#aabf1253aa1eb55c613a70fb3c9271117">last_time</a> = kp-&gt;<a class="code" href="structtw__kp.html#a9e8fe6319cfd909db8f50e29ce43b1fc">pe</a>-&gt;<a class="code" href="structtw__pe.html#a3f82dbbf2dbb0163b6078ff25cb75a1b">GVT</a>;</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;                } <span class="keywordflow">else</span></div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;                {</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;                        kp-&gt;<a class="code" href="structtw__kp.html#aabf1253aa1eb55c613a70fb3c9271117">last_time</a> = kp-&gt;<a class="code" href="structtw__kp.html#a3f7a839239647d5c13db750f34c11013">pevent_q</a>.<a class="code" href="structtw__eventq.html#a0a1d2a79704a9bb361cbc1c1a1f67952">head</a>-&gt;<a class="code" href="structtw__event.html#a4e32bfdbde0d1cae06b5b3fb90adbffa">recv_ts</a>;</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;                }</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;                <span class="comment">/*</span></div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;<span class="comment">                 * place event back into priority queue</span></div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;<span class="comment">                 */</span></div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;                pq_start = <a class="code" href="aarch64_8h.html#a450cf25fa5291629087ca4198de55757">tw_clock_read</a>();</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;                <a class="code" href="splay_8c.html#a60a6784c1d092ff7ddf96cf6762d7b9e">tw_pq_enqueue</a>(kp-&gt;<a class="code" href="structtw__kp.html#a9e8fe6319cfd909db8f50e29ce43b1fc">pe</a>-&gt;<a class="code" href="structtw__pe.html#a90e1dbe51a084d6e02580667159e13ff">pq</a>, e);</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;                kp-&gt;<a class="code" href="structtw__kp.html#a9e8fe6319cfd909db8f50e29ce43b1fc">pe</a>-&gt;<a class="code" href="structtw__pe.html#ac1d26b7bfd058cc55cbf5ee201edb83c">stats</a>.<a class="code" href="structtw__statistics.html#a63bdf31079607ac79020b3efb874dedd">s_pq</a> += <a class="code" href="aarch64_8h.html#a450cf25fa5291629087ca4198de55757">tw_clock_read</a>() - pq_start;</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;        }</div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;}</div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;<span class="keywordtype">void</span></div>
<div class="line"><a name="l00067"></a><span class="lineno"><a class="line" href="tw-kp_8c.html#a64819ac4aba17987e01bb13142e78c86">   67</a></span>&#160;<a class="code" href="tw-kp_8c.html#a64819ac4aba17987e01bb13142e78c86">tw_kp_rollback_event</a>(<a class="code" href="structtw__event.html">tw_event</a> * event)</div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;{</div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;    <a class="code" href="structtw__event.html">tw_event</a>       *e = NULL;</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;    <a class="code" href="structtw__kp.html">tw_kp</a>          *kp;</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;    <a class="code" href="structtw__pe.html">tw_pe</a>          *<a class="code" href="avl__tree_8c.html#ac4c639748d4d5a271d6c54a18f614605">pe</a>;</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;    <a class="code" href="aarch64_8h.html#abcd6b97b84bebf1f961f85cd24b56c60">tw_clock</a> pq_start;</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;    kp = <span class="keyword">event</span>-&gt;dest_lp-&gt;kp;</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;    pe = kp-&gt;<a class="code" href="structtw__kp.html#a9e8fe6319cfd909db8f50e29ce43b1fc">pe</a>;</div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;</div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;    kp-&gt;<a class="code" href="structtw__kp.html#ae0128e497a3731c114d91552ae531ce8">s_rb_total</a>++;</div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;        kp-&gt;<a class="code" href="structtw__kp.html#abe641c39eb731b4d96fa1ef0f3ecc95d">s_rb_secondary</a>++;</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;    <span class="comment">// instrumentation</span></div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;    kp-&gt;<a class="code" href="structtw__kp.html#a05a49ec7f8f98c6d7d8ca15ae1f8abdb">kp_stats</a>-&gt;<a class="code" href="structst__kp__stats.html#ae2b4a980d36048635b285ae9741c5e50">s_rb_total</a>++;</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;        kp-&gt;<a class="code" href="structtw__kp.html#a05a49ec7f8f98c6d7d8ca15ae1f8abdb">kp_stats</a>-&gt;<a class="code" href="structst__kp__stats.html#a0ce7bf1325d124d6666a26012a46410a">s_rb_secondary</a>++;</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;<span class="preprocessor">#if VERIFY_ROLLBACK</span></div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;<span class="preprocessor"></span>        printf(<span class="stringliteral">&quot;%d %d: rb_event: %f \n&quot;</span>, pe-&gt;<a class="code" href="structtw__pe.html#a8a57f2123eddf6a195d82ecc781093e6">id</a>, kp-&gt;<a class="code" href="structtw__kp.html#afb056d26713ffb46913315b0d2f2651b">id</a>, event-&gt;<a class="code" href="structtw__event.html#a4e32bfdbde0d1cae06b5b3fb90adbffa">recv_ts</a>);</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;</div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;        <span class="keywordflow">if</span>(!kp-&gt;<a class="code" href="structtw__kp.html#a3f7a839239647d5c13db750f34c11013">pevent_q</a>.<a class="code" href="structtw__eventq.html#a0c96afb4c69e6f7bba7e72b1332dbd6e">size</a>)</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;                <a class="code" href="ross-extern_8h.html#a49ed2388aaae26e43280b7909c834aaa">tw_error</a>(<a class="code" href="ross-extern_8h.html#afffdf140f2c492f61546ad783833f127">TW_LOC</a>, <span class="stringliteral">&quot;Attempting to rollback empty pevent_q!&quot;</span>);</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;        e = <a class="code" href="tw-eventq_8h.html#aecf7d4bfd567e6356033b8379f5ec3bd">tw_eventq_shift</a>(&amp;kp-&gt;<a class="code" href="structtw__kp.html#a3f7a839239647d5c13db750f34c11013">pevent_q</a>);</div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;        <span class="keywordflow">while</span>(e != event)</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;        {</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;                kp-&gt;<a class="code" href="structtw__kp.html#aabf1253aa1eb55c613a70fb3c9271117">last_time</a> = kp-&gt;<a class="code" href="structtw__kp.html#a3f7a839239647d5c13db750f34c11013">pevent_q</a>.<a class="code" href="structtw__eventq.html#a0a1d2a79704a9bb361cbc1c1a1f67952">head</a>-&gt;<a class="code" href="structtw__event.html#a4e32bfdbde0d1cae06b5b3fb90adbffa">recv_ts</a>;</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;                <a class="code" href="ross-extern_8h.html#ad90c1310a5aeee6d9bff67237f3e9913">tw_event_rollback</a>(e);</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;                pq_start = <a class="code" href="aarch64_8h.html#a450cf25fa5291629087ca4198de55757">tw_clock_read</a>();</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;                <a class="code" href="splay_8c.html#a60a6784c1d092ff7ddf96cf6762d7b9e">tw_pq_enqueue</a>(pe-&gt;<a class="code" href="structtw__pe.html#a90e1dbe51a084d6e02580667159e13ff">pq</a>, e);</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;                pe-&gt;<a class="code" href="structtw__pe.html#ac1d26b7bfd058cc55cbf5ee201edb83c">stats</a>.<a class="code" href="structtw__statistics.html#a63bdf31079607ac79020b3efb874dedd">s_pq</a> += <a class="code" href="aarch64_8h.html#a450cf25fa5291629087ca4198de55757">tw_clock_read</a>() - pq_start;</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;</div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;                e = <a class="code" href="tw-eventq_8h.html#aecf7d4bfd567e6356033b8379f5ec3bd">tw_eventq_shift</a>(&amp;kp-&gt;<a class="code" href="structtw__kp.html#a3f7a839239647d5c13db750f34c11013">pevent_q</a>);</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;        }</div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;        <a class="code" href="ross-extern_8h.html#ad90c1310a5aeee6d9bff67237f3e9913">tw_event_rollback</a>(e);</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;        <span class="keywordflow">if</span> (0 == kp-&gt;<a class="code" href="structtw__kp.html#a3f7a839239647d5c13db750f34c11013">pevent_q</a>.<a class="code" href="structtw__eventq.html#a0c96afb4c69e6f7bba7e72b1332dbd6e">size</a>)</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;                kp-&gt;<a class="code" href="structtw__kp.html#aabf1253aa1eb55c613a70fb3c9271117">last_time</a> = kp-&gt;<a class="code" href="structtw__kp.html#a9e8fe6319cfd909db8f50e29ce43b1fc">pe</a>-&gt;<a class="code" href="structtw__pe.html#a3f82dbbf2dbb0163b6078ff25cb75a1b">GVT</a>;</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;        <span class="keywordflow">else</span></div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;                kp-&gt;<a class="code" href="structtw__kp.html#aabf1253aa1eb55c613a70fb3c9271117">last_time</a> = kp-&gt;<a class="code" href="structtw__kp.html#a3f7a839239647d5c13db750f34c11013">pevent_q</a>.<a class="code" href="structtw__eventq.html#a0a1d2a79704a9bb361cbc1c1a1f67952">head</a>-&gt;<a class="code" href="structtw__event.html#a4e32bfdbde0d1cae06b5b3fb90adbffa">recv_ts</a>;</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;}</div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;</div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;<span class="preprocessor">#ifndef NUM_OUT_MESG</span></div>
<div class="line"><a name="l00111"></a><span class="lineno"><a class="line" href="tw-kp_8c.html#a5c43eb286e0098931722663d043c8163">  111</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define NUM_OUT_MESG 2000</span></div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;<span class="preprocessor"></span><span class="keyword">static</span> <a class="code" href="structtw__out.html">tw_out</a>*</div>
<div class="line"><a name="l00114"></a><span class="lineno"><a class="line" href="tw-kp_8c.html#a0bf4c312e7e773f0e8dbeaa208c43315">  114</a></span>&#160;<a class="code" href="tw-kp_8c.html#a0bf4c312e7e773f0e8dbeaa208c43315">init_output_messages</a>(<a class="code" href="structtw__kp.html">tw_kp</a> *kp)</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;{</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;    <span class="keywordtype">int</span> i;</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;    <a class="code" href="structtw__out.html">tw_out</a> *ret = (<a class="code" href="structtw__out.html">tw_out</a> *) <a class="code" href="ross-extern_8h.html#a445b1ed30cd2e8ef1f837e782a339a70">tw_calloc</a>(<a class="code" href="ross-extern_8h.html#afffdf140f2c492f61546ad783833f127">TW_LOC</a>, <span class="stringliteral">&quot;tw_out&quot;</span>, <span class="keyword">sizeof</span>(<span class="keyword">struct</span> <a class="code" href="structtw__out.html">tw_out</a>), <a class="code" href="tw-kp_8c.html#a5c43eb286e0098931722663d043c8163">NUM_OUT_MESG</a>);</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;</div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;    <span class="keywordflow">for</span> (i = 0; i &lt; <a class="code" href="tw-kp_8c.html#a5c43eb286e0098931722663d043c8163">NUM_OUT_MESG</a> - 1; i++) {</div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;        ret[i].<a class="code" href="structtw__out.html#a55d6ba460ff133b84332cef4be9fac08">next</a> = &amp;ret[i + 1];</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;        ret[i].<a class="code" href="structtw__out.html#a9c4e2ce26d586e714fd6abb7e437fd0e">owner</a> = kp;</div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;    }</div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;    ret[i].<a class="code" href="structtw__out.html#a55d6ba460ff133b84332cef4be9fac08">next</a> = NULL;</div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;    ret[i].<a class="code" href="structtw__out.html#a9c4e2ce26d586e714fd6abb7e437fd0e">owner</a> = kp;</div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;    <span class="keywordflow">return</span> ret;</div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;}</div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;</div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;<span class="keywordtype">void</span></div>
<div class="line"><a name="l00131"></a><span class="lineno"><a class="line" href="tw-kp_8c.html#a4f628dcfcaa889cd15a8142af1b1260e">  131</a></span>&#160;<a class="code" href="tw-kp_8c.html#a4f628dcfcaa889cd15a8142af1b1260e">tw_init_kps</a>(<a class="code" href="structtw__pe.html">tw_pe</a> * me)</div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;{</div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;        <a class="code" href="ross-types_8h.html#a1c8bf5a99e9de5022cdaa304f3979e57">tw_kpid</a> i;</div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;    <span class="keywordtype">int</span> j;</div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;</div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;        <span class="keywordflow">for</span> (i = 0; i &lt; <a class="code" href="ross-extern_8h.html#a4a237c68db5a0325e986d3710088d427">g_tw_nkp</a>; i++)</div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;        {</div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;                <a class="code" href="structtw__kp.html">tw_kp</a> *kp = <a class="code" href="ross-kernel-inline_8h.html#a4066dfaca8faa4af256a377d85cea32f">tw_getkp</a>(i);</div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;</div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;                <span class="keywordflow">if</span> (kp-&gt;<a class="code" href="structtw__kp.html#a9e8fe6319cfd909db8f50e29ce43b1fc">pe</a> != me)</div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;                        <span class="keywordflow">continue</span>;</div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;</div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;                kp-&gt;<a class="code" href="structtw__kp.html#afb056d26713ffb46913315b0d2f2651b">id</a> = i;</div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;        kp-&gt;<a class="code" href="structtw__kp.html#ac6d205df22a30a62f5694ac1d3d1c14a">s_nevent_processed</a> = 0;</div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;                kp-&gt;<a class="code" href="structtw__kp.html#a2c69e0142ab6df7345feeb819dc7b86a">s_e_rbs</a> = 0;</div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;                kp-&gt;<a class="code" href="structtw__kp.html#ae0128e497a3731c114d91552ae531ce8">s_rb_total</a> = 0;</div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;                kp-&gt;<a class="code" href="structtw__kp.html#abe641c39eb731b4d96fa1ef0f3ecc95d">s_rb_secondary</a> = 0;</div>
<div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;        <span class="keywordflow">if</span> (<a class="code" href="ross-extern_8h.html#ae22db4d4e754eff64535402f5fa60a5f">g_tw_synchronization_protocol</a> == <a class="code" href="ross-types_8h.html#abea764c61c75c56008ccf665a71246fda7ff3894aed4e1746b6fb19f9472678c8">OPTIMISTIC</a> ||</div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;            <a class="code" href="ross-extern_8h.html#ae22db4d4e754eff64535402f5fa60a5f">g_tw_synchronization_protocol</a> == <a class="code" href="ross-types_8h.html#abea764c61c75c56008ccf665a71246fdacc902805d3a33320ec8f60c2add387ba">OPTIMISTIC_DEBUG</a> ||</div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;            <a class="code" href="ross-extern_8h.html#ae22db4d4e754eff64535402f5fa60a5f">g_tw_synchronization_protocol</a> == <a class="code" href="ross-types_8h.html#abea764c61c75c56008ccf665a71246fda65a00e65f23b13a6f19ea3e16f9b9e05">OPTIMISTIC_REALTIME</a>) {</div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;            kp-&gt;<a class="code" href="structtw__kp.html#a2142ae798f7ddb968e6e706efe472924">output</a> = <a class="code" href="tw-kp_8c.html#a0bf4c312e7e773f0e8dbeaa208c43315">init_output_messages</a>(kp);</div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;        }</div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;</div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;        <span class="comment">// instrumentation setup</span></div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;        kp-&gt;<a class="code" href="structtw__kp.html#a05a49ec7f8f98c6d7d8ca15ae1f8abdb">kp_stats</a> = (<a class="code" href="structst__kp__stats.html">st_kp_stats</a>*) <a class="code" href="ross-extern_8h.html#a445b1ed30cd2e8ef1f837e782a339a70">tw_calloc</a>(<a class="code" href="ross-extern_8h.html#afffdf140f2c492f61546ad783833f127">TW_LOC</a>, <span class="stringliteral">&quot;KP instrumentation&quot;</span>, <span class="keyword">sizeof</span>(<a class="code" href="structst__kp__stats.html">st_kp_stats</a>), 1);</div>
<div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;        <span class="keywordflow">for</span> (j = 0; j &lt; 3; j++)</div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;            kp-&gt;<a class="code" href="structtw__kp.html#a3da4f035f393ce94c4135f1c20252acf">last_stats</a>[j] = (<a class="code" href="structst__kp__stats.html">st_kp_stats</a>*) <a class="code" href="ross-extern_8h.html#a445b1ed30cd2e8ef1f837e782a339a70">tw_calloc</a>(<a class="code" href="ross-extern_8h.html#afffdf140f2c492f61546ad783833f127">TW_LOC</a>, <span class="stringliteral">&quot;KP instrumentation&quot;</span>, <span class="keyword">sizeof</span>(<a class="code" href="structst__kp__stats.html">st_kp_stats</a>), 1);</div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;        }</div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;}</div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;</div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;<a class="code" href="structtw__out.html">tw_out</a> *</div>
<div class="line"><a name="l00162"></a><span class="lineno"><a class="line" href="tw-kp_8c.html#a6394897673b3028914978e64be355d73">  162</a></span>&#160;<a class="code" href="tw-kp_8c.html#a6394897673b3028914978e64be355d73">tw_kp_grab_output_buffer</a>(<a class="code" href="structtw__kp.html">tw_kp</a> *kp)</div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;{</div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;    <span class="keywordflow">if</span> (kp-&gt;<a class="code" href="structtw__kp.html#a2142ae798f7ddb968e6e706efe472924">output</a>) {</div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;        <a class="code" href="structtw__out.html">tw_out</a> *ret = kp-&gt;<a class="code" href="structtw__kp.html#a2142ae798f7ddb968e6e706efe472924">output</a>;</div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;        kp-&gt;<a class="code" href="structtw__kp.html#a2142ae798f7ddb968e6e706efe472924">output</a> = kp-&gt;<a class="code" href="structtw__kp.html#a2142ae798f7ddb968e6e706efe472924">output</a>-&gt;<a class="code" href="structtw__out.html#a55d6ba460ff133b84332cef4be9fac08">next</a>;</div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;        ret-&gt;<a class="code" href="structtw__out.html#a55d6ba460ff133b84332cef4be9fac08">next</a> = 0;</div>
<div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;        <span class="keywordflow">return</span> ret;</div>
<div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;    }</div>
<div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;</div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;    <span class="keywordflow">return</span> NULL;</div>
<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;}</div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;</div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;<span class="keywordtype">void</span></div>
<div class="line"><a name="l00175"></a><span class="lineno"><a class="line" href="tw-kp_8c.html#ad0bb29129002788f450029e65c38e9e0">  175</a></span>&#160;<a class="code" href="tw-kp_8c.html#ad0bb29129002788f450029e65c38e9e0">tw_kp_put_back_output_buffer</a>(<a class="code" href="structtw__out.html">tw_out</a> *out)</div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;{</div>
<div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;    <a class="code" href="structtw__kp.html">tw_kp</a> *kp = out-&gt;<a class="code" href="structtw__out.html#a9c4e2ce26d586e714fd6abb7e437fd0e">owner</a>;</div>
<div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;</div>
<div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;    <span class="keywordflow">if</span> (kp-&gt;<a class="code" href="structtw__kp.html#a2142ae798f7ddb968e6e706efe472924">output</a>) {</div>
<div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;        out-&gt;<a class="code" href="structtw__out.html#a55d6ba460ff133b84332cef4be9fac08">next</a> = kp-&gt;<a class="code" href="structtw__kp.html#a2142ae798f7ddb968e6e706efe472924">output</a>;</div>
<div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;        kp-&gt;<a class="code" href="structtw__kp.html#a2142ae798f7ddb968e6e706efe472924">output</a> = out;</div>
<div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;    }</div>
<div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;    <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;        kp-&gt;<a class="code" href="structtw__kp.html#a2142ae798f7ddb968e6e706efe472924">output</a> = out;</div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;        kp-&gt;<a class="code" href="structtw__kp.html#a2142ae798f7ddb968e6e706efe472924">output</a>-&gt;<a class="code" href="structtw__out.html#a55d6ba460ff133b84332cef4be9fac08">next</a> = NULL;</div>
<div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;    }</div>
<div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;}</div>
<div class="ttc" id="ross-extern_8h_html_ae22db4d4e754eff64535402f5fa60a5f"><div class="ttname"><a href="ross-extern_8h.html#ae22db4d4e754eff64535402f5fa60a5f">g_tw_synchronization_protocol</a></div><div class="ttdeci">tw_synch g_tw_synchronization_protocol</div><div class="ttdef"><b>Definition:</b> <a href="ross-global_8c_source.html#l00018">ross-global.c:18</a></div></div>
<div class="ttc" id="tw-kp_8c_html_a6394897673b3028914978e64be355d73"><div class="ttname"><a href="tw-kp_8c.html#a6394897673b3028914978e64be355d73">tw_kp_grab_output_buffer</a></div><div class="ttdeci">tw_out * tw_kp_grab_output_buffer(tw_kp *kp)</div><div class="ttdef"><b>Definition:</b> <a href="tw-kp_8c_source.html#l00162">tw-kp.c:162</a></div></div>
<div class="ttc" id="ross-extern_8h_html_afffdf140f2c492f61546ad783833f127"><div class="ttname"><a href="ross-extern_8h.html#afffdf140f2c492f61546ad783833f127">TW_LOC</a></div><div class="ttdeci">#define TW_LOC</div><div class="ttdef"><b>Definition:</b> <a href="ross-extern_8h_source.html#l00164">ross-extern.h:164</a></div></div>
<div class="ttc" id="structtw__out_html_a9c4e2ce26d586e714fd6abb7e437fd0e"><div class="ttname"><a href="structtw__out.html#a9c4e2ce26d586e714fd6abb7e437fd0e">tw_out::owner</a></div><div class="ttdeci">tw_kp * owner</div><div class="ttdef"><b>Definition:</b> <a href="ross-types_8h_source.html#l00238">ross-types.h:238</a></div></div>
<div class="ttc" id="ross_8h_html_a80b370bc538e17441aef6afaff852678"><div class="ttname"><a href="ross_8h.html#a80b370bc538e17441aef6afaff852678">tw_stime</a></div><div class="ttdeci">double tw_stime</div><div class="ttdef"><b>Definition:</b> <a href="ross_8h_source.html#l00150">ross.h:150</a></div></div>
<div class="ttc" id="structtw__statistics_html_a63bdf31079607ac79020b3efb874dedd"><div class="ttname"><a href="structtw__statistics.html#a63bdf31079607ac79020b3efb874dedd">tw_statistics::s_pq</a></div><div class="ttdeci">tw_clock s_pq</div><div class="ttdef"><b>Definition:</b> <a href="ross-types_8h_source.html#l00143">ross-types.h:143</a></div></div>
<div class="ttc" id="structtw__eventq_html_a0a1d2a79704a9bb361cbc1c1a1f67952"><div class="ttname"><a href="structtw__eventq.html#a0a1d2a79704a9bb361cbc1c1a1f67952">tw_eventq::head</a></div><div class="ttdeci">tw_event * head</div><div class="ttdef"><b>Definition:</b> <a href="ross-types_8h_source.html#l00167">ross-types.h:167</a></div></div>
<div class="ttc" id="ross-extern_8h_html_a49ed2388aaae26e43280b7909c834aaa"><div class="ttname"><a href="ross-extern_8h.html#a49ed2388aaae26e43280b7909c834aaa">tw_error</a></div><div class="ttdeci">void tw_error(const char *file, int line, const char *fmt,...) NORETURN</div><div class="ttdef"><b>Definition:</b> <a href="tw-util_8c_source.html#l00074">tw-util.c:74</a></div></div>
<div class="ttc" id="structtw__kp_html_a05a49ec7f8f98c6d7d8ca15ae1f8abdb"><div class="ttname"><a href="structtw__kp.html#a05a49ec7f8f98c6d7d8ca15ae1f8abdb">tw_kp::kp_stats</a></div><div class="ttdeci">struct st_kp_stats * kp_stats</div><div class="ttdef"><b>Definition:</b> <a href="ross-types_8h_source.html#l00366">ross-types.h:366</a></div></div>
<div class="ttc" id="structtw__pe_html_ac1d26b7bfd058cc55cbf5ee201edb83c"><div class="ttname"><a href="structtw__pe.html#ac1d26b7bfd058cc55cbf5ee201edb83c">tw_pe::stats</a></div><div class="ttdeci">tw_statistics stats</div><div class="ttdoc">per PE counters </div><div class="ttdef"><b>Definition:</b> <a href="ross-types_8h_source.html#l00415">ross-types.h:415</a></div></div>
<div class="ttc" id="structtw__kp_html_a3da4f035f393ce94c4135f1c20252acf"><div class="ttname"><a href="structtw__kp.html#a3da4f035f393ce94c4135f1c20252acf">tw_kp::last_stats</a></div><div class="ttdeci">struct st_kp_stats * last_stats[3]</div><div class="ttdef"><b>Definition:</b> <a href="ross-types_8h_source.html#l00367">ross-types.h:367</a></div></div>
<div class="ttc" id="structtw__event_html_a4e32bfdbde0d1cae06b5b3fb90adbffa"><div class="ttname"><a href="structtw__event.html#a4e32bfdbde0d1cae06b5b3fb90adbffa">tw_event::recv_ts</a></div><div class="ttdeci">tw_stime recv_ts</div><div class="ttdoc">Actual time to be received. </div><div class="ttdef"><b>Definition:</b> <a href="ross-types_8h_source.html#l00282">ross-types.h:282</a></div></div>
<div class="ttc" id="structtw__kp_html_a9e8fe6319cfd909db8f50e29ce43b1fc"><div class="ttname"><a href="structtw__kp.html#a9e8fe6319cfd909db8f50e29ce43b1fc">tw_kp::pe</a></div><div class="ttdeci">tw_pe * pe</div><div class="ttdoc">PE that services this KP. </div><div class="ttdef"><b>Definition:</b> <a href="ross-types_8h_source.html#l00342">ross-types.h:342</a></div></div>
<div class="ttc" id="structtw__kp_html_abe641c39eb731b4d96fa1ef0f3ecc95d"><div class="ttname"><a href="structtw__kp.html#abe641c39eb731b4d96fa1ef0f3ecc95d">tw_kp::s_rb_secondary</a></div><div class="ttdeci">long s_rb_secondary</div><div class="ttdoc">Number of secondary rollbacks by this LP. </div><div class="ttdef"><b>Definition:</b> <a href="ross-types_8h_source.html#l00365">ross-types.h:365</a></div></div>
<div class="ttc" id="ross-types_8h_html_abea764c61c75c56008ccf665a71246fda7ff3894aed4e1746b6fb19f9472678c8"><div class="ttname"><a href="ross-types_8h.html#abea764c61c75c56008ccf665a71246fda7ff3894aed4e1746b6fb19f9472678c8">OPTIMISTIC</a></div><div class="ttdef"><b>Definition:</b> <a href="ross-types_8h_source.html#l00030">ross-types.h:30</a></div></div>
<div class="ttc" id="aarch64_8h_html_a450cf25fa5291629087ca4198de55757"><div class="ttname"><a href="aarch64_8h.html#a450cf25fa5291629087ca4198de55757">tw_clock_read</a></div><div class="ttdeci">static tw_clock tw_clock_read(void)</div><div class="ttdef"><b>Definition:</b> <a href="aarch64_8h_source.html#l00006">aarch64.h:6</a></div></div>
<div class="ttc" id="structtw__pe_html"><div class="ttname"><a href="structtw__pe.html">tw_pe</a></div><div class="ttdoc">Holds the entire PE state. </div><div class="ttdef"><b>Definition:</b> <a href="ross-types_8h_source.html#l00375">ross-types.h:375</a></div></div>
<div class="ttc" id="tw-eventq_8h_html_aecf7d4bfd567e6356033b8379f5ec3bd"><div class="ttname"><a href="tw-eventq_8h.html#aecf7d4bfd567e6356033b8379f5ec3bd">tw_eventq_shift</a></div><div class="ttdeci">static tw_event * tw_eventq_shift(tw_eventq *q)</div><div class="ttdef"><b>Definition:</b> <a href="tw-eventq_8h_source.html#l00353">tw-eventq.h:353</a></div></div>
<div class="ttc" id="structtw__kp_html_a3f7a839239647d5c13db750f34c11013"><div class="ttname"><a href="structtw__kp.html#a3f7a839239647d5c13db750f34c11013">tw_kp::pevent_q</a></div><div class="ttdeci">tw_eventq pevent_q</div><div class="ttdoc">Events processed by LPs bound to this KP. </div><div class="ttdef"><b>Definition:</b> <a href="ross-types_8h_source.html#l00359">ross-types.h:359</a></div></div>
<div class="ttc" id="ross-kernel-inline_8h_html_a4066dfaca8faa4af256a377d85cea32f"><div class="ttname"><a href="ross-kernel-inline_8h.html#a4066dfaca8faa4af256a377d85cea32f">tw_getkp</a></div><div class="ttdeci">static tw_kp * tw_getkp(tw_kpid id)</div><div class="ttdef"><b>Definition:</b> <a href="ross-kernel-inline_8h_source.html#l00053">ross-kernel-inline.h:53</a></div></div>
<div class="ttc" id="structtw__event_html"><div class="ttname"><a href="structtw__event.html">tw_event</a></div><div class="ttdoc">Event Stucture. </div><div class="ttdef"><b>Definition:</b> <a href="ross-types_8h_source.html#l00250">ross-types.h:250</a></div></div>
<div class="ttc" id="structtw__kp_html"><div class="ttname"><a href="structtw__kp.html">tw_kp</a></div><div class="ttdef"><b>Definition:</b> <a href="ross-types_8h_source.html#l00340">ross-types.h:340</a></div></div>
<div class="ttc" id="structst__kp__stats_html"><div class="ttname"><a href="structst__kp__stats.html">st_kp_stats</a></div><div class="ttdef"><b>Definition:</b> <a href="st-instrumentation_8h_source.html#l00135">st-instrumentation.h:135</a></div></div>
<div class="ttc" id="ross_8h_html_a650bdf282bba8368dd3325bed7e12abc"><div class="ttname"><a href="ross_8h.html#a650bdf282bba8368dd3325bed7e12abc">TW_STIME_CMP</a></div><div class="ttdeci">#define TW_STIME_CMP(x, y)</div><div class="ttdef"><b>Definition:</b> <a href="ross_8h_source.html#l00154">ross.h:154</a></div></div>
<div class="ttc" id="structtw__kp_html_a2142ae798f7ddb968e6e706efe472924"><div class="ttname"><a href="structtw__kp.html#a2142ae798f7ddb968e6e706efe472924">tw_kp::output</a></div><div class="ttdeci">tw_out * output</div><div class="ttdoc">Output messages. </div><div class="ttdef"><b>Definition:</b> <a href="ross-types_8h_source.html#l00344">ross-types.h:344</a></div></div>
<div class="ttc" id="tw-kp_8c_html_a4f628dcfcaa889cd15a8142af1b1260e"><div class="ttname"><a href="tw-kp_8c.html#a4f628dcfcaa889cd15a8142af1b1260e">tw_init_kps</a></div><div class="ttdeci">void tw_init_kps(tw_pe *me)</div><div class="ttdef"><b>Definition:</b> <a href="tw-kp_8c_source.html#l00131">tw-kp.c:131</a></div></div>
<div class="ttc" id="structst__kp__stats_html_a0ce7bf1325d124d6666a26012a46410a"><div class="ttname"><a href="structst__kp__stats.html#a0ce7bf1325d124d6666a26012a46410a">st_kp_stats::s_rb_secondary</a></div><div class="ttdeci">unsigned int s_rb_secondary</div><div class="ttdef"><b>Definition:</b> <a href="st-instrumentation_8h_source.html#l00143">st-instrumentation.h:143</a></div></div>
<div class="ttc" id="splay_8c_html_a60a6784c1d092ff7ddf96cf6762d7b9e"><div class="ttname"><a href="splay_8c.html#a60a6784c1d092ff7ddf96cf6762d7b9e">tw_pq_enqueue</a></div><div class="ttdeci">void tw_pq_enqueue(splay_tree *st, tw_event *e)</div><div class="ttdef"><b>Definition:</b> <a href="splay_8c_source.html#l00195">splay.c:195</a></div></div>
<div class="ttc" id="tw-kp_8c_html_a5b88c07fbc4f7810bdc676306013b513"><div class="ttname"><a href="tw-kp_8c.html#a5b88c07fbc4f7810bdc676306013b513">tw_kp_rollback_to</a></div><div class="ttdeci">void tw_kp_rollback_to(tw_kp *kp, tw_stime to)</div><div class="ttdef"><b>Definition:</b> <a href="tw-kp_8c_source.html#l00023">tw-kp.c:23</a></div></div>
<div class="ttc" id="structtw__out_html_a55d6ba460ff133b84332cef4be9fac08"><div class="ttname"><a href="structtw__out.html#a55d6ba460ff133b84332cef4be9fac08">tw_out::next</a></div><div class="ttdeci">struct tw_out * next</div><div class="ttdef"><b>Definition:</b> <a href="ross-types_8h_source.html#l00237">ross-types.h:237</a></div></div>
<div class="ttc" id="structtw__kp_html_a2c69e0142ab6df7345feeb819dc7b86a"><div class="ttname"><a href="structtw__kp.html#a2c69e0142ab6df7345feeb819dc7b86a">tw_kp::s_e_rbs</a></div><div class="ttdeci">long s_e_rbs</div><div class="ttdoc">Number of events rolled back by this LP. </div><div class="ttdef"><b>Definition:</b> <a href="ross-types_8h_source.html#l00363">ross-types.h:363</a></div></div>
<div class="ttc" id="tw-kp_8c_html_a5c43eb286e0098931722663d043c8163"><div class="ttname"><a href="tw-kp_8c.html#a5c43eb286e0098931722663d043c8163">NUM_OUT_MESG</a></div><div class="ttdeci">#define NUM_OUT_MESG</div><div class="ttdef"><b>Definition:</b> <a href="tw-kp_8c_source.html#l00111">tw-kp.c:111</a></div></div>
<div class="ttc" id="structtw__pe_html_a90e1dbe51a084d6e02580667159e13ff"><div class="ttname"><a href="structtw__pe.html#a90e1dbe51a084d6e02580667159e13ff">tw_pe::pq</a></div><div class="ttdeci">tw_pq * pq</div><div class="ttdoc">Priority queue used to sort events. </div><div class="ttdef"><b>Definition:</b> <a href="ross-types_8h_source.html#l00381">ross-types.h:381</a></div></div>
<div class="ttc" id="structtw__kp_html_ae0128e497a3731c114d91552ae531ce8"><div class="ttname"><a href="structtw__kp.html#ae0128e497a3731c114d91552ae531ce8">tw_kp::s_rb_total</a></div><div class="ttdeci">long s_rb_total</div><div class="ttdoc">Number of total rollbacks by this LP. </div><div class="ttdef"><b>Definition:</b> <a href="ross-types_8h_source.html#l00364">ross-types.h:364</a></div></div>
<div class="ttc" id="ross_8h_html"><div class="ttname"><a href="ross_8h.html">ross.h</a></div></div>
<div class="ttc" id="tw-kp_8c_html_aafb58a114f017b8491090ea372312684"><div class="ttname"><a href="tw-kp_8c.html#aafb58a114f017b8491090ea372312684">tw_kp_onpe</a></div><div class="ttdeci">void tw_kp_onpe(tw_kpid id, tw_pe *pe)</div><div class="ttdef"><b>Definition:</b> <a href="tw-kp_8c_source.html#l00004">tw-kp.c:4</a></div></div>
<div class="ttc" id="structtw__pe_html_a3f82dbbf2dbb0163b6078ff25cb75a1b"><div class="ttname"><a href="structtw__pe.html#a3f82dbbf2dbb0163b6078ff25cb75a1b">tw_pe::GVT</a></div><div class="ttdeci">tw_stime GVT</div><div class="ttdoc">Global Virtual Time. </div><div class="ttdef"><b>Definition:</b> <a href="ross-types_8h_source.html#l00403">ross-types.h:403</a></div></div>
<div class="ttc" id="ross-types_8h_html_a1c8bf5a99e9de5022cdaa304f3979e57"><div class="ttname"><a href="ross-types_8h.html#a1c8bf5a99e9de5022cdaa304f3979e57">tw_kpid</a></div><div class="ttdeci">tw_peid tw_kpid</div><div class="ttdef"><b>Definition:</b> <a href="ross-types_8h_source.html#l00045">ross-types.h:45</a></div></div>
<div class="ttc" id="avl__tree_8c_html_ac4c639748d4d5a271d6c54a18f614605"><div class="ttname"><a href="avl__tree_8c.html#ac4c639748d4d5a271d6c54a18f614605">pe</a></div><div class="ttdeci">tw_pe * pe</div><div class="ttdef"><b>Definition:</b> <a href="avl__tree_8c_source.html#l00011">avl_tree.c:11</a></div></div>
<div class="ttc" id="structst__kp__stats_html_ae2b4a980d36048635b285ae9741c5e50"><div class="ttname"><a href="structst__kp__stats.html#ae2b4a980d36048635b285ae9741c5e50">st_kp_stats::s_rb_total</a></div><div class="ttdeci">unsigned int s_rb_total</div><div class="ttdef"><b>Definition:</b> <a href="st-instrumentation_8h_source.html#l00142">st-instrumentation.h:142</a></div></div>
<div class="ttc" id="aarch64_8h_html_abcd6b97b84bebf1f961f85cd24b56c60"><div class="ttname"><a href="aarch64_8h.html#abcd6b97b84bebf1f961f85cd24b56c60">tw_clock</a></div><div class="ttdeci">uint64_t tw_clock</div><div class="ttdef"><b>Definition:</b> <a href="aarch64_8h_source.html#l00004">aarch64.h:4</a></div></div>
<div class="ttc" id="ross-types_8h_html_abea764c61c75c56008ccf665a71246fdacc902805d3a33320ec8f60c2add387ba"><div class="ttname"><a href="ross-types_8h.html#abea764c61c75c56008ccf665a71246fdacc902805d3a33320ec8f60c2add387ba">OPTIMISTIC_DEBUG</a></div><div class="ttdef"><b>Definition:</b> <a href="ross-types_8h_source.html#l00031">ross-types.h:31</a></div></div>
<div class="ttc" id="tw-kp_8c_html_a64819ac4aba17987e01bb13142e78c86"><div class="ttname"><a href="tw-kp_8c.html#a64819ac4aba17987e01bb13142e78c86">tw_kp_rollback_event</a></div><div class="ttdeci">void tw_kp_rollback_event(tw_event *event)</div><div class="ttdef"><b>Definition:</b> <a href="tw-kp_8c_source.html#l00067">tw-kp.c:67</a></div></div>
<div class="ttc" id="structtw__kp_html_afb056d26713ffb46913315b0d2f2651b"><div class="ttname"><a href="structtw__kp.html#afb056d26713ffb46913315b0d2f2651b">tw_kp::id</a></div><div class="ttdeci">tw_kpid id</div><div class="ttdoc">ID number, otherwise its not available to the app. </div><div class="ttdef"><b>Definition:</b> <a href="ross-types_8h_source.html#l00341">ross-types.h:341</a></div></div>
<div class="ttc" id="structtw__out_html"><div class="ttname"><a href="structtw__out.html">tw_out</a></div><div class="ttdoc">Rollback-aware output mechanism. </div><div class="ttdef"><b>Definition:</b> <a href="ross-types_8h_source.html#l00236">ross-types.h:236</a></div></div>
<div class="ttc" id="structtw__eventq_html_a0c96afb4c69e6f7bba7e72b1332dbd6e"><div class="ttname"><a href="structtw__eventq.html#a0c96afb4c69e6f7bba7e72b1332dbd6e">tw_eventq::size</a></div><div class="ttdeci">size_t size</div><div class="ttdef"><b>Definition:</b> <a href="ross-types_8h_source.html#l00166">ross-types.h:166</a></div></div>
<div class="ttc" id="tw-kp_8c_html_a0bf4c312e7e773f0e8dbeaa208c43315"><div class="ttname"><a href="tw-kp_8c.html#a0bf4c312e7e773f0e8dbeaa208c43315">init_output_messages</a></div><div class="ttdeci">static tw_out * init_output_messages(tw_kp *kp)</div><div class="ttdef"><b>Definition:</b> <a href="tw-kp_8c_source.html#l00114">tw-kp.c:114</a></div></div>
<div class="ttc" id="ross-extern_8h_html_ad90c1310a5aeee6d9bff67237f3e9913"><div class="ttname"><a href="ross-extern_8h.html#ad90c1310a5aeee6d9bff67237f3e9913">tw_event_rollback</a></div><div class="ttdeci">void tw_event_rollback(tw_event *event)</div><div class="ttdef"><b>Definition:</b> <a href="tw-event_8c_source.html#l00181">tw-event.c:181</a></div></div>
<div class="ttc" id="ross-extern_8h_html_a4a237c68db5a0325e986d3710088d427"><div class="ttname"><a href="ross-extern_8h.html#a4a237c68db5a0325e986d3710088d427">g_tw_nkp</a></div><div class="ttdeci">tw_kpid g_tw_nkp</div><div class="ttdef"><b>Definition:</b> <a href="ross-global_8c_source.html#l00025">ross-global.c:25</a></div></div>
<div class="ttc" id="structtw__pe_html_a8a57f2123eddf6a195d82ecc781093e6"><div class="ttname"><a href="structtw__pe.html#a8a57f2123eddf6a195d82ecc781093e6">tw_pe::id</a></div><div class="ttdeci">tw_peid id</div><div class="ttdef"><b>Definition:</b> <a href="ross-types_8h_source.html#l00376">ross-types.h:376</a></div></div>
<div class="ttc" id="ross-extern_8h_html_a445b1ed30cd2e8ef1f837e782a339a70"><div class="ttname"><a href="ross-extern_8h.html#a445b1ed30cd2e8ef1f837e782a339a70">tw_calloc</a></div><div class="ttdeci">void * tw_calloc(const char *file, int line, const char *for_who, size_t e_sz, size_t n)</div><div class="ttdef"><b>Definition:</b> <a href="tw-util_8c_source.html#l00203">tw-util.c:203</a></div></div>
<div class="ttc" id="tw-kp_8c_html_ad0bb29129002788f450029e65c38e9e0"><div class="ttname"><a href="tw-kp_8c.html#ad0bb29129002788f450029e65c38e9e0">tw_kp_put_back_output_buffer</a></div><div class="ttdeci">void tw_kp_put_back_output_buffer(tw_out *out)</div><div class="ttdef"><b>Definition:</b> <a href="tw-kp_8c_source.html#l00175">tw-kp.c:175</a></div></div>
<div class="ttc" id="ross_8h_html_a096f73feb08316896d644277b486c9ea"><div class="ttname"><a href="ross_8h.html#a096f73feb08316896d644277b486c9ea">TW_STIME_DBL</a></div><div class="ttdeci">#define TW_STIME_DBL(x)</div><div class="ttdef"><b>Definition:</b> <a href="ross_8h_source.html#l00153">ross.h:153</a></div></div>
<div class="ttc" id="ross-types_8h_html_abea764c61c75c56008ccf665a71246fda65a00e65f23b13a6f19ea3e16f9b9e05"><div class="ttname"><a href="ross-types_8h.html#abea764c61c75c56008ccf665a71246fda65a00e65f23b13a6f19ea3e16f9b9e05">OPTIMISTIC_REALTIME</a></div><div class="ttdef"><b>Definition:</b> <a href="ross-types_8h_source.html#l00032">ross-types.h:32</a></div></div>
<div class="ttc" id="structtw__kp_html_aabf1253aa1eb55c613a70fb3c9271117"><div class="ttname"><a href="structtw__kp.html#aabf1253aa1eb55c613a70fb3c9271117">tw_kp::last_time</a></div><div class="ttdeci">tw_stime last_time</div><div class="ttdoc">Time of the current event being processed. </div><div class="ttdef"><b>Definition:</b> <a href="ross-types_8h_source.html#l00360">ross-types.h:360</a></div></div>
<div class="ttc" id="structtw__kp_html_ac6d205df22a30a62f5694ac1d3d1c14a"><div class="ttname"><a href="structtw__kp.html#ac6d205df22a30a62f5694ac1d3d1c14a">tw_kp::s_nevent_processed</a></div><div class="ttdeci">tw_stat s_nevent_processed</div><div class="ttdoc">Number of events processed. </div><div class="ttdef"><b>Definition:</b> <a href="ross-types_8h_source.html#l00361">ross-types.h:361</a></div></div>
<div class="ttc" id="ross-extern_8h_html_a64132b3acc0476622c31d7dc1676d227"><div class="ttname"><a href="ross-extern_8h.html#a64132b3acc0476622c31d7dc1676d227">g_tw_kp</a></div><div class="ttdeci">tw_kp ** g_tw_kp</div><div class="ttdef"><b>Definition:</b> <a href="ross-global_8c_source.html#l00027">ross-global.c:27</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.6
</small></address>
</body>
</html>
